<!--
 * @Description: 
 * @Version: 2.0
 * @Author: Xing
 * @Date: 2021-02-05 22:32:42
 * @LastEditors: Xing
 * @LastEditTime: 2021-02-06 20:42:49
-->
<template>
  <div class="hello">
    <div>{{ test_value }}</div>
    <button @click="onChange">变化</button>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
export default defineComponent({
  name: 'HelloWorld',
  props: {
    msg: String,
  },
  data() {
    return {
      test_value: '我是vue2啦啦啦啦啦',
    };
  },
  created() {
    // console.log('我是create');
  },
  methods: {
    onChange() {
      this.test_value = '我变了';
    },
  },
});
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
